package com.baijiaoxi.common.model.base.service.interceptor;

import com.baijiaoxi.common.model.base.model.CoreModel;

public interface BaseInterceptor<E extends CoreModel> {
    enum ChangeType {
        insert,
        updateById,
        delById,
        delBatchAsSingle,
        delBatch
    }

    /**
     * 插入、修改、删除后调用
     *
     * @param entity
     */
    default void afterChange(ChangeType changeType, E entity) {
    }
}
